<!DOCTYPE html>
<html lang="en">

<head>
<link rel="shortcut icon" href="img/ic.png">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>参赛车队</title>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="css/sb-admin.css" rel="stylesheet">

    <!-- Morris Charts CSS -->
    <link href="css/plugins/morris.css" rel="stylesheet">
	<link href="dist/css/bootstrapValidator.css" rel="stylesheet">
    <!-- Custom Fonts -->
    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet" href="css/cdn/font_evmq6xwfabutyb9.css">
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
	<script src="js/cdn/html5shiv-3.7.0.js"></script>
	<script src="js/cdn/respond-1.4.2.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" href="css/cdn/dataTables.bootstrap.css">
	<link rel="stylesheet" href="css/cdn/font_i0327076nave7b9.css">
    <link href="nuget/content/content/toastr.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" type="text/css" href="css/datatable.css"/>
    <style>
		#example_paginate{
			float:right;
		}
		.handle-btn{
			cursor: pointer;
		    margin: 0 2px;
		}
		#wrapper {
		    padding-left:0px;
		}
		.navigation{
			border-bottom: 3px solid #edebeb;
		}
		
		.navigation a:hover{
			color: #0F6AFC;
			border-bottom: 2px solid #01AAED;
		}
		.this{
			color: #01aaed;
			font-weight:bold;
			border-bottom: 2px solid #01AAED;
		}
		#check>tbody>tr{
			line-height: 20px;
		}
		
		[v-cloak] {
			display: none;
		}
        .participatingSelect{
            position: relative;
        }
		.participatingSelect input{
            float: left;
            width: 360px;
            height:36px;
            padding-left:15px;
            font-size: 14px;
            color: #b1b1b1;
            line-height:36px;
            border: 1px solid #e5e5e5;
        }
        .participatingSelect button{
            position: absolute;
            top:0;
            right:0;
            width: 70px;
            height:36px;
            background: #FFBF01;
            border: none;
            border-radius: 4px;
        }
        .participatingSelect button img{
            position: absolute;
            left: 50%;
            top:50%;
            width:18px;
            height:auto;
            -webkit-transform: translate(-50%,-50%);
            -moz-transform: translate(-50%,-50%);
            -ms-transform: translate(-50%,-50%);
            -o-transform: translate(-50%,-50%);
            transform: translate(-50%,-50%);
        }

    </style>
</head>

<body>
    <div id="wrapper">
        <div id="page-wrapper">
            <div class="container-fluid">
                <div class="row">
                        <div class="panel-heading">
                        	<ul class="nav">
                        		<li style="float: left;">
                        			<b class="panel-title" style=" line-height: 34px;"><span class="xiahua">测评车队</span></b>
                        		</li>
                        		<li style="float: left; padding-left: 20px;">
									<button class="btn btn-primary" type="button" data-toggle="modal" data-target="#deviceStateModal">
							    		添加车辆
									</button>
                        		</li>
								<li class="participatingSelect" style="float: left; padding-left: 20px;">
									<input type="text" placeholder="输入测评车辆名称、测评单位、联系人等">
									<button @click="select()"><img src="img/search_26.png" alt=""></button>
								</li>
                        	</ul>
                        </div>
                        <div class="panel">
	                        <div class="panel-body">
	                            <table id="example" class="display" width="100%"></table>
	                        </div>
                        </div>
                </div>
				<div id="deviceStateModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" class="modal fade bs-example-modal-lg in">
					<div class="modal-dialog modal-lg">
						<div class="modal-content" style="border-top: 5px solid rgb(18, 219, 205);">
							<div class="modal-body">
								<div class="panel-body">
									<form id="TeamsForm" method="get" class="form-horizontal bv-form" novalidate="novalidate">
										<button type="submit" class="bv-hidden-submit" style="display: none; width: 0px; height: 0px;"></button>
										<div class="text-center" style="line-height: 34px; margin-bottom: 5px; font-size: 16px;"><b>添加车辆</b></div>
										<div class="form-group has-feedback"><label class="col-sm-2 control-label">车辆名称</label>
											<div class="col-sm-4">
												<input type="text" name="teamName" id="teamName" class="form-control " data-bv-field="teamName">
												<i class="form-control-feedback" data-bv-icon-for="teamName" style="display: none;"></i>
												<small class="help-block" data-bv-validator="notEmpty" data-bv-for="teamName" data-bv-result="NOT_VALIDATED" style="display: none;">车队名不能为空</small>
												<small class="help-block" data-bv-validator="stringLength" data-bv-for="teamName" data-bv-result="NOT_VALIDATED" style="display: none;">车队名称长度必须位于3到20之间</small>
											</div>
											<label class="col-sm-2 control-label">测评单位</label>
											<div class="col-sm-4">
												<input type="text" name="teamOrganization" class="form-control" data-bv-field="teamOrganization">
												<i class="form-control-feedback" data-bv-icon-for="teamOrganization" style="display: none;"></i>
												<small class="help-block" data-bv-validator="notEmpty" data-bv-for="teamOrganization" data-bv-result="NOT_VALIDATED" style="display: none;">参赛单位不能为空</small>
												<small class="help-block" data-bv-validator="stringLength" data-bv-for="teamOrganization" data-bv-result="NOT_VALIDATED" style="display: none;">参赛单位长度必须位于3到20之间</small>
											</div>
										</div>
										<div class="form-group has-feedback">
											<label class="col-sm-2 control-label">测评车数</label>
											<div class="col-sm-4">
												<input type="number" min="0" name="automobileQuantity" class="form-control" data-bv-field="automobileQuantity">
												<i class="form-control-feedback" data-bv-icon-for="automobileQuantity" style="display: none;"></i>
												<small class="help-block" data-bv-validator="greaterThan" data-bv-for="automobileQuantity" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a value greater than or equal to %s</small>
												<small class="help-block" data-bv-validator="integer" data-bv-for="automobileQuantity" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a valid number</small>
											</div>
											<label class="col-sm-2 control-label">参与测评人数</label>
											<div class="col-sm-4">
												<input type="number" min="0" name="matchesNumber" class="form-control" data-bv-field="matchesNumber">
												<i class="form-control-feedback" data-bv-icon-for="matchesNumber" style="display: none;"></i>
												<small class="help-block" data-bv-validator="greaterThan" data-bv-for="matchesNumber" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a value greater than or equal to %s</small>
												<small class="help-block" data-bv-validator="integer" data-bv-for="matchesNumber" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a valid number</small>
											</div>
										</div>
										<div class="form-group">
											<label class="col-sm-2 control-label">是否参加离线测试</label>
											<div class="col-sm-4">
												<label class="checkbox-inline"><input type="radio" name="offlineTest" id="offlineTest1" value="Y">参加</label>
												<label class="checkbox-inline"><input type="radio" name="offlineTest" id="offlineTest2" value="N">不参加</label>
											</div>
											<label class="col-sm-2 control-label">车队编号</label>
											<div class="col-sm-4">
												<input type="text" name="teamLotNo" class="form-control">
											</div>
										</div>
										<hr>
										<div class="form-group has-feedback">
											<label class="col-sm-2 control-label">联系人</label>
											<div class="col-sm-4">
												<input type="text" name="teamLeader" class="form-control" data-bv-field="teamLeader">
												<i class="form-control-feedback" data-bv-icon-for="teamLeader" style="display: none;"></i>
												<small class="help-block" data-bv-validator="notEmpty" data-bv-for="teamLeader" data-bv-result="NOT_VALIDATED" style="display: none;">联系人不能为空</small>
												<small class="help-block" data-bv-validator="stringLength" data-bv-for="teamLeader" data-bv-result="NOT_VALIDATED" style="display: none;">联系人长度必须位于3到20之间</small>
											</div>
											<label class="col-sm-2 control-label">联系方式</label>
											<div class="col-sm-4">
												<input type="text" name="teamPhone" class="form-control" data-bv-field="teamPhone">
												<i class="form-control-feedback" data-bv-icon-for="teamPhone" style="display: none;"></i>
												<small class="help-block" data-bv-validator="notEmpty" data-bv-for="teamPhone" data-bv-result="NOT_VALIDATED" style="display: none;">手机号码不能为空</small>
												<small class="help-block" data-bv-validator="regexp" data-bv-for="teamPhone" data-bv-result="NOT_VALIDATED" style="display: none;">请输入正确的手机号码</small>
											</div>
										</div>
										<div class="form-group">
											<label class="col-sm-2 control-label">负责人性别</label>
											<div class="col-sm-4"><label class="checkbox-inline">
												<input type="radio" name="gender" id="gender1" value="0">男</label>
												<label class="checkbox-inline"><input type="radio" name="gender" id="gender2" value="1">女</label>
											</div>
											<label class="col-sm-2 control-label">负责人职务</label>
											<div class="col-sm-4">
												<input type="text" name="duty" class="form-control">
											</div>
										</div>
										<div class="form-group has-feedback">
											<label class="col-sm-2 control-label">负责人办公电话</label>
											<div class="col-sm-4">
												<input type="tel" name="officePhone" class="form-control">
											</div>
											<label class="col-sm-2 control-label">负责人电子邮件</label>
											<div class="col-sm-4">
												<input type="email" name="email" class="form-control" data-bv-field="email">
												<i class="form-control-feedback" data-bv-icon-for="email" style="display: none;"></i>
												<small class="help-block" data-bv-validator="notEmpty" data-bv-for="email" data-bv-result="NOT_VALIDATED" style="display: none;">邮箱地址不能为空</small>
												<small class="help-block" data-bv-validator="emailAddress" data-bv-for="email" data-bv-result="NOT_VALIDATED" style="display: none;">请输入正确的邮箱地址</small>
											</div>
										</div>
										<hr>
										<div class="form-group has-feedback">
											<label class="col-sm-2 control-label">赛车车长（毫米）</label>
											<div class="col-sm-4">
												<input type="number" min="0" name="automobileLength" class="form-control" data-bv-field="automobileLength">
												<i class="form-control-feedback" data-bv-icon-for="automobileLength" style="display: none;"></i>
												<small class="help-block" data-bv-validator="greaterThan" data-bv-for="automobileLength" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a value greater than or equal to %s</small>
												<small class="help-block" data-bv-validator="integer" data-bv-for="automobileLength" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a valid number</small>
											</div>
											<label class="col-sm-2 control-label">赛车车宽（毫米）</label>
											<div class="col-sm-4">
												<input type="number" min="0" name="automobileWidth" class="form-control" data-bv-field="automobileWidth">
												<i class="form-control-feedback" data-bv-icon-for="automobileWidth" style="display: none;"></i>
												<small class="help-block" data-bv-validator="greaterThan" data-bv-for="automobileWidth" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a value greater than or equal to %s</small>
												<small class="help-block" data-bv-validator="integer" data-bv-for="automobileWidth" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a valid number</small>
											</div>
										</div>
										<div class="form-group has-feedback">
											<label class="col-sm-2 control-label">赛车车高（毫米）</label>
											<div class="col-sm-4">
												<input type="number" min="0" name="automobileHeight" class="form-control" data-bv-field="automobileHeight">
												<i class="form-control-feedback" data-bv-icon-for="automobileHeight" style="display: none;"></i>
												<small class="help-block" data-bv-validator="greaterThan" data-bv-for="automobileHeight" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a value greater than or equal to %s</small>
												<small class="help-block" data-bv-validator="integer" data-bv-for="automobileHeight" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a valid number</small>
											</div>
										</div>
										<div class="form-group has-feedback">
											<label class="col-sm-2 control-label">离去角（度）</label>
											<div class="col-sm-4">
												<input type="number" min="0" name="departureAngle" class="form-control" data-bv-field="departureAngle">
												<i class="form-control-feedback" data-bv-icon-for="departureAngle" style="display: none;"></i>
												<small class="help-block" data-bv-validator="greaterThan" data-bv-for="departureAngle" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a value greater than or equal to %s</small>
												<small class="help-block" data-bv-validator="integer" data-bv-for="departureAngle" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a valid number</small>
											</div>
											<label class="col-sm-2 control-label">接近角（度）</label>
											<div class="col-sm-4">
												<input type="number" min="0" name="approachAngle" class="form-control" data-bv-field="approachAngle">
												<i class="form-control-feedback" data-bv-icon-for="approachAngle" style="display: none;"></i>
												<small class="help-block" data-bv-validator="greaterThan" data-bv-for="approachAngle" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a value greater than or equal to %s</small>
												<small class="help-block" data-bv-validator="integer" data-bv-for="approachAngle" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a valid number</small>
											</div>
										</div>
										<div class="form-group has-feedback">
											<label class="col-sm-2 control-label">轮距（毫米）</label>
											<div class="col-sm-4">
												<input type="number" min="0" name="wheelTrack" class="form-control" data-bv-field="wheelTrack">
												<i class="form-control-feedback" data-bv-icon-for="wheelTrack" style="display: none;"></i>
												<small class="help-block" data-bv-validator="greaterThan" data-bv-for="wheelTrack" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a value greater than or equal to %s</small>
												<small class="help-block" data-bv-validator="integer" data-bv-for="wheelTrack" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a valid number</small>
											</div>
											<label class="col-sm-2 control-label">轴距（毫米）</label>
											<div class="col-sm-4">
												<input type="number" min="0" name="wheelBase" class="form-control" data-bv-field="wheelBase">
												<i class="form-control-feedback" data-bv-icon-for="wheelBase" style="display: none;"></i>
												<small class="help-block" data-bv-validator="greaterThan" data-bv-for="wheelBase" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a value greater than or equal to %s</small>
												<small class="help-block" data-bv-validator="integer" data-bv-for="wheelBase" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a valid number</small>
											</div>
										</div>
										<div class="form-group has-feedback">
											<label class="col-sm-2 control-label">最小离地间隙（毫米）</label>
											<div class="col-sm-4">
												<input type="number" min="0" name="minGroundClearance" class="form-control" data-bv-field="minGroundClearance">
												<i class="form-control-feedback" data-bv-icon-for="minGroundClearance" style="display: none;"></i>
												<small class="help-block" data-bv-validator="greaterThan" data-bv-for="minGroundClearance" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a value greater than or equal to %s</small>
												<small class="help-block" data-bv-validator="integer" data-bv-for="minGroundClearance" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a valid number</small>
											</div>
											<label class="col-sm-2 control-label">最小转弯半径（毫米）</label>
											<div class="col-sm-4">
												<input type="number" min="0" name="minTurningRadius" class="form-control" data-bv-field="minTurningRadius">
												<i class="form-control-feedback" data-bv-icon-for="minTurningRadius" style="display: none;"></i>
												<small class="help-block" data-bv-validator="greaterThan" data-bv-for="minTurningRadius" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a value greater than or equal to %s</small>
												<small class="help-block" data-bv-validator="integer" data-bv-for="minTurningRadius" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a valid number</small>
											</div>
										</div>
										<div class="form-group has-feedback">
											<label class="col-sm-2 control-label">自主行驶最高车速</label>
											<div class="col-sm-4">
												<input type="number" min="0" name="maxSpeed" class="form-control" data-bv-field="maxSpeed">
												<i class="form-control-feedback" data-bv-icon-for="maxSpeed" style="display: none;"></i>
												<small class="help-block" data-bv-validator="greaterThan" data-bv-for="maxSpeed" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a value greater than or equal to %s</small>
												<small class="help-block" data-bv-validator="integer" data-bv-for="maxSpeed" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a valid number</small>
											</div>
											<label class="col-sm-2 control-label">自主行驶最低车速</label>
											<div class="col-sm-4">
												<input type="number" min="0" name="minSpeed" class="form-control" data-bv-field="minSpeed">
												<i class="form-control-feedback" data-bv-icon-for="minSpeed" style="display: none;"></i>
												<small class="help-block" data-bv-validator="greaterThan" data-bv-for="minSpeed" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a value greater than or equal to %s</small>
												<small class="help-block" data-bv-validator="integer" data-bv-for="minSpeed" data-bv-result="NOT_VALIDATED" style="display: none;">Please enter a valid number</small>
											</div>
										</div>
										<!--<div class="form-group has-feedback">
											<label class="col-sm-2 control-label">前视图</label>
											<div class="col-sm-4">
												<input type="file" name="file" onchange="fileChange(this);" readonly="readonly" class="form-control" data-bv-field="file">
												<i class="form-control-feedback" data-bv-icon-for="file" style="display: none;"></i>
												<small class="help-block" data-bv-validator="notEmpty" data-bv-for="file" data-bv-result="NOT_VALIDATED" style="display: none;">前视图不能为空</small>
											</div>
											<label class="col-sm-2 control-label">侧视图</label>
											<div class="col-sm-4">
												<input type="file" name="file2" onchange="fileChange(this);" readonly="readonly" class="form-control" data-bv-field="file2">
												<i class="form-control-feedback" data-bv-icon-for="file2" style="display: none;"></i>
												<small class="help-block" data-bv-validator="notEmpty" data-bv-for="file2" data-bv-result="NOT_VALIDATED" style="display: none;">侧视图不能为空</small>
											</div>
										</div>-->
										<hr>
										<div class="text-center">
											<button type="button" data-dismiss="modal" aria-hidden="true" class="btn btn-default">关闭</button>
											<button type="submit" class="btn btn-primary" style="margin-left: 10px;">保存</button>
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
				</div>
                <!-- 修改车队 -->
				<!--<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
					<div class="modal-dialog">
						<div class="modal-content">
							<div class="modal-body">
								<section class="panel">
			                        <div class="panel-body">
			                            <form class="form-horizontal" id="teamform" method="get">
			                            	  <div class="text-center" style="line-height: 34px; margin-bottom: 5px; font-size: 16px;"><b>编辑车队</b></div>
				                              <div class="form-group">
				                              	  <input  name="teamId" type="hidden" :value="teamsObj.teamId"/>
				                                  <label class="col-sm-2 control-label">车队名称</label>
				                                  <div class="col-sm-10">
				                                      <input type="text" name="teamName"  class="form-control" :value="teamsObj.teamName">
				                                  </div>
				                              </div>
				                              <div class="form-group">
				                                  <label class="col-sm-2 control-label">参赛单位</label>
				                                  <div class="col-sm-10">
				                                      <input type="text" name="teamOrganization" :value="teamsObj.teamOrganization" class="form-control">
				                                  </div>
				                              </div>
				                              <div class="form-group">
				                                  <label class="col-sm-2 control-label">车队编号</label>
				                                  <div class="col-sm-10">
				                                      <input type="text" name="teamLotNo" :value="teamsObj.teamLotNo"  class="form-control">
				                                  </div>
				                              </div>
				                                <div class="form-group">
				                                  <label class="col-sm-2 control-label">联系人</label>
				                                  <div class="col-sm-10">
				                                      <input type="text" name="teamLeader" :value="teamsObj.teamLeader" class="form-control">
				                                  </div>
				                                </div>
				                                <div class="form-group">
				                                  <label class="col-sm-2 control-label">联系方式</label>
				                                  <div class="col-sm-10">
				                                      <input type="text" name="teamPhone" :value="teamsObj.teamPhone" class="form-control">
				                                  </div>
				                                </div>
				                                <div class="text-center">
				                                	<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">
														关闭
													</button>
													<button type="submit" class="btn btn-primary" style="margin-left: 10px;">
														保存
													</button>
												</div>
			                        	</form>
			                        </div>
			                    </section>
							</div>

						</div>&lt;!&ndash; /.modal-content &ndash;&gt;
					</div>&lt;!&ndash; /.modal &ndash;&gt;
				</div>-->
				<div class="modal fade bs-example-modal-lg" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
					<div class="modal-dialog modal-lg">
						<div class="modal-content">
							<div class="modal-body">
								<section class="panel">
									<div class="panel-body">
										<form class="form-horizontal" id="teamform" method="get">
											<div class="text-center" style="line-height: 34px; margin-bottom: 5px; font-size: 16px;"><b>编辑车辆</b></div>
											<div class="form-group">
												<input  name="teamId" type="hidden" :value="teamsObj.teamId"/>
												<label class="col-sm-2 control-label">车辆名称</label>
												<div class="col-sm-4">
													<input type="text" name="teamName"  class="form-control" :value="teamsObj.teamName">
												</div>
												<label class="col-sm-2 control-label">测评单位</label>
												<div class="col-sm-4">
													<input type="text" name="teamOrganization" :value="teamsObj.teamOrganization" class="form-control">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">测评车数</label>
												<div class="col-sm-4">
													<input type="number" min="0" name="automobileQuantity" :value="teamsObj.automobileQuantity" class="form-control">
												</div>
												<label class="col-sm-2 control-label">参与测评人数</label>
												<div class="col-sm-4">
													<input type="number" min="0" name="matchesNumber" :value="teamsObj.matchesNumber" class="form-control">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">是否参加离线测试</label>
												<div class="col-sm-4">
													<label class="radio-inline">
														<input type="radio" name="offlineTest" v-model="teamsObj.offlineTest" value="Y">
														参加
													</label>
													<label class="radio-inline">
														<input type="radio" name="offlineTest" v-model="teamsObj.offlineTest" value="N">
														不参加
													</label>
												</div>
												<label class="col-sm-2 control-label">车辆编号</label>
												<div class="col-sm-4">
													<input type="text" name="teamLotNo" :value="teamsObj.teamLotNo"  class="form-control">
												</div>
											</div>
											<hr>
											<div class="form-group">
												<label class="col-sm-2 control-label">联系人</label>
												<div class="col-sm-4">
													<input type="text" name="teamLeader" :value="teamsObj.teamLeader" class="form-control">
												</div>
												<label class="col-sm-2 control-label">联系方式</label>
												<div class="col-sm-4">
													<input type="text" name="teamPhone" :value="teamsObj.teamPhone" class="form-control">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">负责人性别</label>
												<div class="col-sm-4">
													<label class="radio-inline">
														<input type="radio" name="gender" v-model="teamsObj.gender" value="0">
														男
													</label>
													<label class="radio-inline">
														<input type="radio" name="gender" v-model="teamsObj.gender" value="1">
														女
													</label>
												</div>
												<label class="col-sm-2 control-label">负责人职务</label>
												<div class="col-sm-4">
													<input type="text" name="duty" v-model="teamsObj.duty" class="form-control">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">负责人办公电话</label>
												<div class="col-sm-4">
													<input type="tel" name="officePhone" :value="teamsObj.officePhone" class="form-control">
												</div>
												<label class="col-sm-2 control-label">负责人电子邮件</label>
												<div class="col-sm-4">
													<input type="email" name="email" :value="teamsObj.email" class="form-control">
												</div>
											</div>
											<hr>
											<div class="form-group">
												<label class="col-sm-2 control-label">赛车车长（毫米）</label>
												<div class="col-sm-4">
													<input type="number" min="0" name="automobileLength" :value="teamsObj.automobileLength" class="form-control">
												</div>
												<label class="col-sm-2 control-label">赛车车宽（毫米）</label>
												<div class="col-sm-4">
													<input type="number" min="0" name="automobileWidth" :value="teamsObj.automobileWidth" class="form-control">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">赛车车高（毫米）</label>
												<div class="col-sm-4">
													<input type="number" min="0" name="automobileHeight" :value="teamsObj.automobileHeight" class="form-control">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">离去角（度）</label>
												<div class="col-sm-4">
													<input type="number" min="0" name="departureAngle" :value="teamsObj.departureAngle" class="form-control">
												</div>
												<label class="col-sm-2 control-label">接近角（度）</label>
												<div class="col-sm-4">
													<input type="number" min="0" name="approachAngle" :value="teamsObj.approachAngle" class="form-control">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">轮距（毫米）</label>
												<div class="col-sm-4">
													<input type="number" min="0" name="wheelTrack" :value="teamsObj.wheelTrack" class="form-control">
												</div>
												<label class="col-sm-2 control-label">轴距（毫米）</label>
												<div class="col-sm-4">
													<input type="number" min="0" name="wheelBase" :value="teamsObj.wheelBase" class="form-control">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">最小离地间隙（毫米）</label>
												<div class="col-sm-4">
													<input type="number" min="0" name="minGroundClearance" :value="teamsObj.minGroundClearance" class="form-control">
												</div>
												<label class="col-sm-2 control-label">最小转弯半径（毫米）</label>
												<div class="col-sm-4">
													<input type="number" min="0" name="minTurningRadius" :value="teamsObj.minTurningRadius" class="form-control">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">自主行驶最高车速</label>
												<div class="col-sm-4">
													<input type="number" min="0" name="maxSpeed" :value="teamsObj.maxSpeed" class="form-control">
												</div>
												<label class="col-sm-2 control-label">自主行驶最低车速</label>
												<div class="col-sm-4">
													<input type="number" min="0" name="minSpeed" :value="teamsObj.minSpeed" class="form-control">
												</div>
											</div>
											<!--隐藏域，用于记录上传后的文件地址-->
											<!--<div class="checkbox" style="margin-left: 1rem;">
												<label>
													<input type="checkbox" v-model="editImg" v-on:click="reForm();"> 修改前视图和侧视图
												</label>
											</div>
											<div v-show="editImg">
												<div class="form-group">
													<label class="col-sm-2 control-label">前视图</label>
													<div class="col-sm-4">
														<input type="file" name="file" onchange="fileChange(this);" readonly class="form-control">
													</div>
													<label class="col-sm-2 control-label">侧视图</label>
													<div class="col-sm-4">
														<input type="file" name="file2" onchange="fileChange(this);" readonly class="form-control">
													</div>
												</div>
											</div>-->

											<!--end-->
											<div class="text-center">
												<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">
													关闭
												</button>
												<button type="submit" class="btn btn-primary" style="margin-left: 10px;">
													保存
												</button>
											</div>
										</form>
									</div>
								</section>
							</div>

						</div><!-- /.modal-content -->
					</div><!-- /.modal -->
				</div>

				<!-- /.删除 -->
                <div class="modal fade" id="Delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				    <div class="modal-dialog">
				        <div class="modal-content" style="border-top: 5px solid #12dbcd;">
				            <div class="modal-body text-center">确定要删除此项？</div>
				            <div class="text-center" style="padding-bottom: 15px;">
				            	<input id="teamId" name="teamId" type="hidden" :value="teamsObj.teamId"/>
				                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				                <button style="margin-left: 10px;" type="button" v-on:click="Delete()" class="btn btn-primary">确定</button>
				            </div>
				        </div><!-- /.modal-content -->
				    </div><!-- /.modal -->
				</div>
            </div>
            <!-- /.container-fluid -->

        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="js/jquery.js"></script>
    <!-- Bootstrap Core JavaScript -->
    <script src="js/bootstrap.min.js"></script>
    <!-- tab table-->
	<script src="js/cdn/jquery.dataTables.min.js"></script>
	<script src="js/cdn/dataTables.bootstrap.js"></script>
	<script src="nuget/content/scripts/toastr.js"></script>
    <script type="text/javascript" src="js/common.js" ></script>
    <script type="text/javascript" src="dist/js/bootstrapValidator.min.js"></script>
    <!-- Morris Charts JavaScript -->
    <script src="js/plugins/morris/raphael.min.js"></script>
    <script type="text/javascript" src="js/vue/vue.js" ></script>
    <script type="text/javascript" src="js/vue/vue-router.js" ></script>
	<script>
		function fileChange(ele) {
			var flag = false;
			var img = new Image();
			var reader = new FileReader();
			reader.onload = function (evt) {
				img.src = evt.target.result;
			};
			img.onload = function (e) {
				flag = true;
				/*if($(img)[0].width != 640 || $(img)[0].height != 480){
                    alert("图片分辨率640×480，请重新选择合适图片！");
                }*/
			};
			reader.readAsDataURL(ele.files[0]);

			var file = $(ele)[0].files[0];
			if (file.type.indexOf("jpeg") < 0) {
				alert("请上传JPG格式图片！");
				$(ele).val(null);
				return false;
			}
		}
			var userName = localStorage.getItem("userName");    $("#userName").text(userName);
		Vue.filter("timeChange", function(value) {
			return replaceTime(value / 1000);
		});
		var vue = new Vue({
		  el: '#wrapper',
		  data:{
			  editImg:false,
		  	teamsObj: {
		  		deviceType : "",
		  		deviceName : "",
		  		deviceMode : "",
		  		deviceVersion : "",
		  		channel : "",
		  		ipAddress : "",
		  		servicePort : "",
		  		deviceRunState : "",
		  		sinceId : "",
		  		deviceAddress : "",
		  		deviceId: "",
		  		teamId:"",
		  	},
		  	Validator:{
				message:'This value is not valid',
					// 定义未通过验证的状态图标
			    feedbackIcons: {
				    valid: 'glyphicon glyphicon-ok',
				    invalid: 'glyphicon glyphicon-remove',
				    validating: 'glyphicon glyphicon-refresh'
			    },
			    fields:{
			   	
				    teamName:{
				     message:'车队名称非法',
				     validators:{
				      notEmpty:{
				       message:'车队名不能为空'
				      },
				      stringLength:{
				       min:2,
				       max:20,
				       message:'车队名称长度必须位于3到20之间'
				      },
				      
				     }
				    },
			    
				    teamOrganization:{
				     message:'参赛单位非法',
				     validators:{
				      notEmpty:{
				       message:'参赛单位不能为空'
				      },
				      stringLength:{
				       min:2,
				       max:20,
				       message:'参赛单位长度必须位于3到20之间'
				      },
				     }
				    },
			    
				    teamLeader:{
				     message:'联系人非法',
				     validators:{
				      notEmpty:{
				       message:'联系人不能为空'
				      },
				      stringLength:{
				       min:2,
				       max:20,
				       message:'联系人长度必须位于3到20之间'
				      },
				     }
				    },
					//电子邮箱
				    email:{
				     validators:{
				      notEmpty:{
				       message:'邮箱地址不能为空'
				      },
				      emailAddress:{
				       message:'请输入正确的邮箱地址'
				      }
				     }
				    },
			 
					//手机号码
				    teamPhone:{
				     validators:{
				      notEmpty:{
				       message:'手机号码不能为空'
				      },
				      stringlength:{
				       min:11,
				       max:11,
				       message:'请输入11位手机号码'
				      },
				      regexp:{
				       regexp:/^1[3|5|7|8]{1}[0-9]{9}$/,
				       message:'请输入正确的手机号码'
				      }
				     }
				    },
			
			   }
			},
		  },
		  mounted:function(){
		  	this.deviceBasicId();
		  	this.form();
		  },
		  methods:{
		  	form:function(){
				//车队新增
				$("#TeamsForm").bootstrapValidator(
					this.Validator
				).on("success.form.bv",function(){
					vue.deviceState();
				});
				//修改
				$("#teamform").bootstrapValidator(
					this.Validator
				).on("success.form.bv",function(){
					vue.Submit();
				});
		  	},
		  	
		  	//初始化显示详情
		  	deviceBasicId:function(){
		  		$(document).ready(function() {
				  var myTable = $('#example').DataTable({
				      "processing": false, //DataTables载入数据时，是否显示‘进度’提示  
				      "stateSave": true, //是否打开客户端状态记录功能,此功能在ajax刷新纪录的时候不会将个性化设定回复为初始化状态  
				      "scrollCollapse": true, //是否开启DataTables的高度自适应，当数据条数不够分页数据条数的时候，插件高度是否随数据条数而改变  
				      "paginationType": "full_numbers", //详细分页组，可以支持直接跳转到某页  
				      "language": lang, //提示信息
				      "destroy":true,//Cannot reinitialise DataTable,解决3s重新加载表格内容问题
				      "autoWidth": true, //自适应宽度，
				      "lengthMenu": [8, 30, 50],
				      "stripeClasses": ["odd", "even"], //为奇偶行加上样式，兼容不支持CSS伪类的场合
				      "showRowNumber":true,
				      "searching": false, //是否允许Datatables开启本地搜索
				      "paging": false, //是否开启本地分页
				      "lengthChange": false, //是否允许产品改变表格每页显示的记录数
				      "info": false, //控制是否显示表格左下角的信息
				      //跟数组下标一样，第一列从0开始，这里表格初始化时，第四列默认降序
				      "ordering": false,
				      "deferRender": true, //延迟渲染
				      //"ajax":"json/device.json",
				      "ajax": {
				      	url : url +'/users/'+adminId+'/teams',
						type : 'get',
						data:{
							"currentPage":1,
							"pageSize":9999,
						},
						dataType : 'json',
						beforeSend: function(request) {
				            request.setRequestHeader("accessToken", accessToken);
				        },
						success : function(data) {
				      		console.log(data);
							if(data['code'] == 1){
								if(data.result.length != 0)
									$('#example').dataTable().fnAddData(data.result);
								else
									$('#example').dataTable().fnClearTable();
							}else{
								//ifajax(data);
							}
						}
				      }, //数据的路径 "http://192.168.5.133:8081/ic-iot/admin/'+adminId+'/devices" /"json/device.json"
				     
				      "columns": [ {
				      	"data":"teamLotNo",
				      	"width":"30px",
				      	"sTitle":"编号",
				      	"sDefaultContent": "", 
				      },{
				        "data": function(obj){
				        	//var sceneId = getOption("sceneId",obj.sceneId);
				        	var teamId = obj.teamId;
				        	return '<a style="color:#1aa79d;" href="team_detail.html?teamId='+teamId+'">'+obj.teamName+'</a>';
				        	//return '<span class="handle-btn handle-btn-edit" style="color:#1aa79d; text-decoration:none;" data-toggle="modal" data-target="#myModal" onclick=javascript:vue.team('+teamId+');>' + obj.teamName + '</span>'
				        },
				        "sTitle": "车队", //标题
				        "sDefaultContent": "", //此列默认值为""，以防数据中没有此值，DataTables加载数据的时候报错  
				      }, {
				      	"data":"teamOrganization",
				      	"sTitle":"参赛单位",
				      	"sDefaultContent": "", 
				      },{
				      	"data":"teamLeader",
				      	"sTitle":"联系人",
				      	"sDefaultContent": "", 
				      }, {
				      	"data":"teamPhone",
				      	"sTitle":"联系电话",
				      	"sDefaultContent": "", 
				      },{
				      	"data": function(obj){
				        	var teamId = obj.teamId;
				            return '<span title="编辑" class="handle-btn handle-btn-edit" data-toggle="modal" data-target="#myModal" onclick=javascript:vue.team('+teamId+');><i class="iconfont icon-xiangqing" style="color:#ffbe00"></i></span><span  title="删除" data-toggle="modal" data-target="#Delete" onclick=javascript:vue.team('+teamId+'); class="handle-btn handle-btn-edit"><b class="iconfont icon-shanchu" style="color:#ffbe00"></b></span>';
				        },
				        "className": "td-handle",//data-user='+teid+'  id="test'+teid+'" 
				        "sTitle": "操作", //标题
				        "width":"50px",
				        "sDefaultContent": "", //此列默认值为""，以防数据中没有此值，DataTables加载数据的时候报错  onclick=javascript:team('+teamId+');
				      }],
				    });
				});
		  	},
		  	
		  	team : function(teamId){
		  		var _self=this;
			  	$.ajax({
		  			type: "get",
		  			url:url+'/users/'+adminId+'/teams/'+teamId,
		  			async: false,
		  			dataType: 'json',
					contentType: "application/json; charset=utf-8",
		  			beforeSend: function(request) {
						request.setRequestHeader("accessToken", accessToken);
					},
					success: function(data) {
						if(data.code == 1){
							_self.teamsObj = {}; 
							var result = data.result;
							_self.teamsObj = result;
							_self.editImg=false;
						}else{
							toastr['error'](data.description);
						}
						
					}
		  		});
			},
		  	//点击修改车队信息
		  	Submit:function(){
		  		var datas = formToJson($("#teamform"));
		  		var th = this;
		  		$.ajax({
		  			type: "PUT",
		  			url:url+'/users/'+adminId+'/teams',//http://60.205.229.131:8085/mark
		  			data:datas,
					async:false,
		  			dataType: 'json',
					contentType: "application/json; charset=utf-8",
		  			beforeSend: function(request) {
						request.setRequestHeader("accessToken", accessToken);
					},
					success: function(data) {
						if(data.code == 1){
							$('#myModal').modal('hide');
							th.deviceBasicId();
						}else{
							toastr['error'](data.description);
						}
					}
		  		});
		  	},
		  	//新增
		  	deviceState:function(){
		  		var datas = formToJson($("#TeamsForm"));
		  		var th = this;
		  		$.ajax({
		  			type: "POST",
		  			url:url+'/users/'+adminId+'/teams',
		  			data:datas,
		  			async: false,
		  			dataType: 'json',
					contentType: "application/json; charset=utf-8",
		  			beforeSend: function(request) {
						request.setRequestHeader("accessToken", accessToken);
					},
					success: function(data) {
		  				console.log(datas);
		  				console.log(data);
						if(data.code == 1){
							$('#deviceStateModal').modal('hide');
							//th.deviceBasicId();//刷新
						}else{
							toastr['error'](data.description);
						}
					},
					error:function (data) {
						console.log(data);
					}
		  		});
		  	},
		  	
		  	//删除
		  	Delete :function(){
		  		var teamId = $("#teamId").val();
	  			var th = this;
	  			$.ajax({
		  			type: "DELETE",
		  			url:url+'/users/'+adminId+'/teams/'+teamId, 
		  			async: false,
		  			dataType: 'json',
					contentType: "application/json; charset=utf-8",
		  			beforeSend: function(request) {
						request.setRequestHeader("accessToken", accessToken);
					},
					success: function(data) {
						if(data.code == 1){
							$('#Delete').modal('hide');
							th.deviceBasicId();//刷新
						}else{
							toastr['error'](data.description);
						}
					}
		  		});
		  	},
		  	select :function () {
                var selectKey=$(".participatingSelect input").val();
                if(selectKey==""){
					$("#example tbody tr").each(function () {
						$(this).show();
                    });
					return false;
                }
                $("#example tbody tr").each(function () {
                	var bloons=false;
                    for (var i=0; i<4; i++){
						var strs=$(this).find("td").eq(i).html();
						if (strs.indexOf(selectKey)>-1){
							bloons=true;
                        }
                    }
                    if(bloons){
                        $(this).show();
                    }else{
                    	$(this).hide();
                    }
				})
		  	}
		  },
		});

	</script>
</body>

</html>
